home *** CD-ROM | disk | FTP | other *** search
/ Programming Sound Cards / Programming Sound Cards.iso / sound_25 / voicekit.doc < prev   
Text File  |  1995-01-01  |  42KB  |  895 lines

  1.               Digitized Voice Programmer's Toolkit for the PC
  2.               -----------------------------------------------
  3.                               Version 3.0
  4.  
  5.                  Copyright (c) 1988-1993 Farpoint Software
  6.  
  7.                        Toolkit Instruction Manual
  8.  
  9. -----------------------------------------------------------------------------
  10.  
  11.                            Table of Contents
  12.                            -----------------
  13.  
  14. I.     Introduction.................................................... 2
  15.  
  16. II.    Two Different Playback Methods
  17.        A. Internal PC Speaker.......................................... 2
  18.        B. Printer Port Device.......................................... 2
  19.  
  20. III.   How Recordings Are Made......................................... 2
  21.  
  22. IV.    Shareware Notice................................................ 3
  23.  
  24. V.     Feature List for DVPT Version 3.0
  25.        A. Features Common to both Standard and Professional Versions... 3
  26.        B. Features Found Only in the Professional Version.............. 4
  27.  
  28. VI.    List of Files Included in the Toolkit
  29.        A. Standard Version............................................. 4
  30.        B. Additional Files in the Professional Version................. 4
  31.  
  32. VII.   The Voice Data File Editor (VDFE)............................... 5
  33.  
  34. VIII.  The Playback Module (FSSPEAK.EXE)............................... 5
  35.  
  36. IX.    How To Use FSSPEAK.EXE as a Transient Program................... 5
  37.  
  38. X.     How To Use FSSPEAK.EXE as a TSR (Memory-resident) Program....... 7
  39.  
  40. XI.    The Example Programs........................................... 10
  41.  
  42. XII.   Other Programs Included in the Toolkit......................... 10
  43.  
  44. XIII.  How To Reduce Disk Space Requirements.......................... 12
  45.  
  46. XIV.   The EAR-WIZARD Playback Device................................. 13
  47.  
  48. XV.    Playback Through the PC Speaker................................ 13
  49.  
  50. XVI.   Speed Requirements for the Target Machine...................... 13
  51.  
  52. XVII.  General Information About the Digitizer (Recorder)............. 14
  53.  
  54. XVIII. The Signal Level Indicators on the Digitizer................... 15
  55.  
  56. XIX.   Using the EAR-WIZARD as a Security Device.......................15
  57.  
  58. XX.    Pricing........................................................ 16
  59.  
  60. ---------- DVPT version 3.0 Instruction Manual ---------- page 2 ----------
  61.  
  62.  
  63. I. Introduction
  64.    ------------
  65.  
  66. This toolkit is a combination of software and hardware designed for the
  67. purpose of mechanizing and simplifying the process by which programmers may
  68. create digitized voice recordings, store them on disk, edit the voice data
  69. files, and incorporate digitized voice playback into their own high-level
  70. language programs.
  71.  
  72. This is the third major release of the Digitized Voice Programmer's Toolkit.
  73. The most obvious changes compared to version 2 include a complete change in
  74. the programing interface to avoid the necessity of linking our code into
  75. your program, the availability of a NEW INEXPENSIVE SOUND OUTPUT DEVICE
  76. (the EAR-WIZARD) that plugs into the printer port, and the ability to
  77. directly play compressed sound files. In addition, the playback code will
  78. now function in a DOS box under enhanced-mode Microsoft Windows.
  79.  
  80.  
  81. II. Two Different Playback Methods
  82.     ------------------------------
  83.  
  84.   A. Internal PC Speaker
  85.       This method is of course the least expensive option. It has the
  86.       advantage of working on the majority of PCs of the 286 class or faster,
  87.       and requires NO SPECIAL HARDWARE at the end user's site; you ship only
  88.       software. The disadvantage of this method is that the quality of
  89.       speakers in PCs varies considerably. In many cases the sound will be
  90.       distorted or low-volume.
  91.  
  92.   B. Printer Port Device
  93.       This is an inexpensive device from Farpoint known as the EAR-WIZARD.
  94.       This is a small (0.65" by 1.90" by 2.17") block that plugs directly
  95.       into any parallel printer (LPT) port. It has a 3.5mm stereo-type phono
  96.       jack which can drive either a set of headphones or an external speaker.
  97.       An amplified speaker gives the best sound; however, the EAR-WIZARD is
  98.       capable of driving non-amplified speakers to a reasonable volume level.
  99.       A volume control is provided with enough range to accomodate all of the
  100.       above output devices. The advantage to using the EAR-WIZARD is an
  101.       improvement in both sound quality and consistency of results. Even
  102.       laptop PCs, which normally have very poor internal speakers, will
  103.       produce the same result with the EAR-WIZARD as any desktop PC.
  104.  
  105.  
  106. III. How Recordings Are Made
  107.      -----------------------
  108.  
  109. The recording of digitized voice requires an external hardware device,
  110. available from Farpoint Software. Note to users of DVPT version 2:
  111. Your board will work; no changes have been made to the recording hardware.
  112.  
  113. ---------- DVPT version 3.0 Instruction Manual ---------- page 3 ----------
  114.  
  115.  
  116. IV. Shareware Notice
  117.     ----------------
  118.  
  119. The Digitized Voice Programmer's Toolkit is released as Shareware. This is
  120. copyrighted material; it is NOT "free software". You are permitted to
  121. experiment with this package long enough to determine if it suits your needs,
  122. up to a limit of 30 days, but if you will be making use of the material in
  123. your own programs, then a license fee is required. NO PROGRAM WHICH MAKES
  124. USE OF THE MATERIALS IN THIS TOOLKIT MAY BE SOLD COMMERCIALLY, ON A CONTRACT
  125. BASIS, OR AS SHAREWARE UNLESS THE SELLER HAS PAID THE LICENSE FEE. Details
  126. of pricing for licensing and various hardware components can be found at the
  127. end of this file.
  128.  
  129. For your convenience and our records, a registration/order form is included
  130. in the file ORDER.FRM.
  131.  
  132. You are granted permission to distribute copies of the SHAREWARE release of
  133. the Digitized Voice Programmer's Toolkit, provided that (1) no fee is charged
  134. for such copies, other that a nominal disk duplication fee, (2) these files
  135. are distributed in their original, unmodified form, and (3) ALL the files in
  136. the original archive are included with each copy. (See "List of Files" below.)
  137. You may NOT distribute any files from a REGISTERED version of this software
  138. package except as specified in the licensing agreement.
  139.  
  140. If you paid a "disk duplication fee" or other such fee to a distributor of
  141. public domain and shareware programs, be aware that the payment of this fee
  142. does not constitute registration of this Toolkit. Likewise, the payment of a
  143. fee to any Bulletin Board Service for the time required to download this
  144. Toolkit does not constitute registration. Registration occurs only through
  145. direct interaction with Farpoint Software.
  146.  
  147. If more information is needed, write or contact Alan D. Jones through
  148. Compuserve Information Service at user ID [74030,554], or call Farpoint
  149. Software at 713-332-3782 (voice) or 713-332-4730 (fax).
  150.  
  151.  
  152. V. Feature List for DVPT version 3.0
  153.    ---------------------------------
  154.  
  155.   A. Features Common to both Standard and Professional Versions
  156.  
  157.     1. Operates in the DOS environment.
  158.     2. Provides a redistributable (with license) executable module that
  159.        performs all playback functions. This is an EXE file that is intended
  160.        to be shipped to the end user with your application. Unlike previous
  161.        versions of DVPT, it is no longer necessary to compile and link our
  162.        code into your program. You can write your application in any language
  163.        that has the capability of executing external programs.
  164.     3. The playback module is capable of being used either as a TSR driver
  165.        (removable from memory on demand), or as a conventional transient
  166.        program.
  167.     4. There are no length limitations on either the size of the memory
  168.        buffers or the size of the voice data files on disk other than the
  169.        physical limits of the machine itself. 64k is not a special number.
  170.  
  171. ---------- DVPT version 3.0 Instruction Manual ---------- page 4 ----------
  172.  
  173.     5. Playback is accomplished either through the PC speaker or through
  174.        Farpoint's EAR-WIZARD device plugged into a printer port.
  175.     6. A sophisticated voice data file editor is provided. It provides a file
  176.        indexing feature that can be used to directly create "sound dictionary"
  177.        files of a format that is relatively easy for the programmer to
  178.        manipulate.
  179.     7. Short example programs are included, written in C, which demonstrate
  180.        the use of the playback module.
  181.  
  182.   B. Features Found Only in the Professional Version
  183.  
  184.     1. Sound data files can be compressed 2:1 using mu-Law compression
  185.        or 4:1 using ADPCM compression. These compressed files can be
  186.        directly played without decompressing them on disk, thus reducing
  187.        disk space requirements. This also allows a much longer continuous
  188.        sound block to be played within a given memory buffer size.
  189.     2. The playback module will play files at any sample rate from 7500 Hz
  190.        to 32767 Hz. In comparison, the Standard version operates only at
  191.        16572 Hz (compatible with version 2 files). A utility is provided
  192.        that can alter the inherent sample rate of a sound file.
  193.  
  194.  
  195. VI. List of Files Included in the Toolkit
  196.     -------------------------------------
  197.  
  198.    A. Standard Version
  199.        VOICEKIT.DOC     --  this file
  200.        READ.ME          --  instructions for printing VOICEKIT.DOC
  201.        ORDER.FRM        --  a printable order form
  202.        DEMO.VOI         --  just a sample of recorded voice
  203.        RUN_ME.BAT       --  plays the demo
  204.        FSSPEAK.EXE      --  the redistributable playback module
  205.        VDFE.EXE         --  the voice data file editor
  206.        VDFE.HLP         --  help file for the voice data file editor
  207.        EXAMPLE1.C       --  shows how to use FSSPEAK as a transient program
  208.        EXAMPLE1.EXE     --  compiled executable of EXAMPLE1.C
  209.        EXAMPLE2.C       --  shows how to use FSSPEAK as a TSR
  210.        EXAMPLE2.EXE     --  compiled executable of EXAMPLE2.C
  211.        ULAW.EXE         --  compresses 8-bit PCM files to 4-bit uLaw
  212.        UNULAW.EXE       --  decompresses 4-bit uLaw files to 8-bit PCM
  213.        ADPCM.EXE        --  compresses 8-bit PCM files to 2-bit ADPCM
  214.        UNADPCM.EXE      --  decompresses 2-bit ADPCM files to 8-bit PCM
  215.        ADJUST.EXE       --  tool for adjustment of the voice recorder
  216.  
  217. If you received the Toolkit with any of the above files missing, please
  218. notify Farpoint Software.
  219.  
  220.    B. Additional Files in the Professional Version
  221.        FSSPEAK.EXE      --  playback module with additional features
  222.        RESAMPLE.EXE     --  changes the actual sample rate of a PCM file
  223.        MAKEWAVE.EXE     --  creates WAV-format files from Farpoint PCM files
  224.        LOWPASS.EXE      --  digital filter used by RESAMPLE & MAKEWAVE
  225.  
  226. ---------- DVPT version 3.0 Instruction Manual ---------- page 5 ----------
  227.  
  228. VII. The Voice Data File Editor (VDFE)
  229.      ---------------------------------
  230.  
  231. This program provides a convenient environment for creating, editing, and
  232. generally patching together voice data files, and creating index files for
  233. them. VDFE requires no command line parameters. Upon execution, it displays
  234. its primary screen and waits for user input. This consists of an assortment
  235. of single keystroke commands, accessible directly or through a keyboard
  236. operated pulldown menu system. The editor and its operation are described
  237. in detail in the file VDFE.HLP; this file can be displayed by pressing the
  238. <F1> key while executing VDFE.
  239.  
  240. NOTE: The VDFE editor operates only with uncompressed data files, at a fixed
  241. sample rate of 16572 Hz. Even if you plan to ship compressed sound data files,
  242. always keep your original uncompressed files for editing or other
  243. reprocessing. Uncompressed files can be recovered from compressed files,
  244. but the original sound quality will not be restored.
  245.  
  246.  
  247. VIII. The Playback Module (FSSPEAK.EXE)
  248.       ---------------------------------
  249.  
  250. Almost any high-level language or application-generation system supports
  251. some method by which other (external) programs can be executed. FSSPEAK.EXE
  252. is used in this manner. It accepts an assortment of command-line parameters
  253. to invoke its various functions and modes of operation. Command line
  254. parameters must appear in the order shown and must be separated by one or
  255. more blanks. A parameter enclosed in square brackets is optional; the square
  256. brackets do not actually appear in the command line. Angle brackets are shown
  257. here as delimiters for individual named parameters, but do not actually
  258. appear in the command line.
  259.  
  260. FSSPEAK will operate in a DOS box under enhanced-mode Microsoft Windows if
  261. the following condition is met: The user's SYSTEM.INI file must be modified
  262. to include the line "TrapTimerPorts=False" in the "[386Enh]" section. Note
  263. that the END USER must do this, so your software package needs to explain
  264. this to the user if you intend your program to be capable of operating
  265. under Microsoft Windows. Be aware that, in this environment, the playback
  266. cannot be stopped with a keystroke as it can under DOS.
  267.  
  268.  
  269. IX. How to Use FSSPEAK.EXE as a Transient Program
  270.     ---------------------------------------------
  271.  
  272. This is the simplest way to use FSSPEAK, although it produces more disk
  273. activity and therefore slightly slower responsiveness. 
  274.  
  275. There are two types of invocations required. First, as an initialization
  276. procedure, a "calibration file" must be created by FSSPEAK. This requires
  277. the application to either specify the output device or use the auto-locate
  278. function to find an EAR-WIZARD if one exists. If specified by the
  279. application, the choices are: (a) the internal speaker, (b) an EAR-WIZARD
  280. on LPT1, (c) an EAR-WIZARD on LPT2, or (d) an EAR-WIZARD on LPT3. If the
  281. user changes the desired output device, the calibration must be run again.
  282. The full command line looks like this:
  283.  
  284. ---------- DVPT version 3.0 Instruction Manual ---------- page 6 ----------
  285.  
  286.   FSSPEAK.EXE /Sdc <sps> <cal file>
  287.  
  288.     *   "d" is a number from 0 to 3 where 0 = internal speaker, 1 = LPT1,
  289.         2 = LPT2, and 3 = LPT3.  Alternatively, placing an 'A' in this
  290.         position causes the program to automatically locate an EAR-WIZARD
  291.         on any LPT port if one exists. If no EAR-WIZARD is found, then the
  292.         internal PC speaker is used.  Placing a 'B' in this position also
  293.         invokes auto-locate, but returns an error if no EAR-WIZARD is found.
  294.     +   "c" is the compression algorithm where 0 = no compression, 1 = uLaw,
  295.         and 2 = ADPCM.
  296.     +   "sps" is the sample rate (in samples per second) of the stored data.
  297.     *   "cal file" is the name of the file which is to be created (or
  298.         overwritten). The file will contain the calibration results.
  299.  
  300. Parameters in the above list marked with "+" have no effect in the Standard
  301. Version. They must still be present as place holders in the command line.
  302. The compression algorithm will always be "no compression" and the sample
  303. rate will always be forced to 16572 Hz.
  304.  
  305. Once a calibration file has been created, unlimited playback invocations
  306. can be executed without re-calibration.
  307.  
  308. The second type of invocation is the playback itself. The command line 
  309. looks like this:
  310.  
  311.   FSSPEAK.EXE /P <cal file> <data file> [<index file> <index>]
  312.       * "cal file" is the name of the calibration file created earlier with
  313.         the /S option.
  314.       * "data file" is the name of the file containing voice data.
  315.       * "index file" names the block index file created with the "VDFE"
  316.         editor.
  317.       * "index" is a decimal number indicating which block to play.
  318.  
  319. The last two parameters are included only if you are using an index file.
  320. without an index file, the entire data file is played.
  321.  
  322. IMPORTANT: There must be enough free memory to load both FSSPEAK and the
  323. sound data when you do this. FSSPEAK will occupy about 40k. The memory
  324. required by the sound data is equal to the file size (or the size of the
  325. indexed block).
  326.  
  327. Example: You want to play the 3rd block, then the 5th block, from a sound
  328. data file called SOUND.VOI with its corresponding index file SOUND.NDX.
  329. The files are sampled at 11025 Hz and uLaw compressed. The output is to be
  330. through an EAR-WIZARD on port LPT2:
  331.  
  332.   Calibrate:
  333.                 FSSPEAK.EXE /S21 11025 calib.fil
  334.                               ||   |      |
  335.                        LPT2--- |   |      |
  336.                                |   |      |
  337.             uLaw compression---    |      |
  338.                                    |      |
  339.                      sample rate---       |
  340.                                           |
  341.               name for calibration file---
  342.  
  343. ---------- DVPT version 3.0 Instruction Manual ---------- page 7 ----------
  344.  
  345.   Play block 3:
  346.                 FSSPEAK.EXE /P calib.fil sound.voi sound.ndx 3
  347.  
  348.   Play block 5:
  349.                 FSSPEAK.EXE /P calib.fil sound.voi sound.ndx 5
  350.  
  351. Example: You want to play an uncompressed file without indexing, recorded
  352. with VDFE at 16572 Hz, through an automatically located EAR-WIZARD or the
  353. PC's internal speaker if there is no EAR-WIZARD. Again assume the file to
  354. be named SOUND.VOI:
  355.  
  356.   Calibrate:
  357.                 FSSPEAK.EXE /SA0 16572 calib.fil
  358.  
  359.   Play the file:
  360.                 FSSPEAK.EXE /P calib.fil sound.voi
  361.  
  362. FSSPEAK.EXE sets the DOS "exit code" based on the result of the operation.
  363. In many languages, the "exec" call or its equivalent will return this value
  364. to your program. In a batch file, the value appears as the value of the
  365. variable "ERRORLEVEL". These are the possible exit codes and their meanings:
  366.  
  367.   1  - Completed successfully
  368.   2  - No parameters found on command line
  369.   3  - Unable to interpret command line
  370.   6  - Sound output destination is invalid (non-existent LPT port?)
  371.   7  - Invalid compression algorithm
  372.   8  - Sample rate out of range. Range is 7500 to 32767.
  373.   9  - Error writing calibration file
  374.   10 - Error reading calibration file
  375.   11 - Error reading data file
  376.   12 - Error reading index file
  377.   13 - Specified block number does not exist in index file
  378.   14 - This CPU is too slow to function correctly
  379.   15 - Attemped to run under Windows without "TrapTimerPorts=False"
  380.   16 - Insufficient memory available to load sound data
  381.   19 - DOS version number too low (must be 3.1 or higher)
  382.  
  383.  
  384. X. How to Use FSSPEAK.EXE as a TSR (Memory-resident) Program
  385.    ---------------------------------------------------------
  386.  
  387. Using FSSPEAK.EXE as a resident driver results in lower memory consumption
  388. (resident code occupies 11k) and slightly faster response times since the
  389. EXE file does not need to be loaded for each playback event.
  390.  
  391. FSSPEAK.EXE can be either loaded before your application (in a batch file)
  392. or by the application itself. To load it into memory, the command line looks
  393. like this:
  394.  
  395.   FSSPEAK.EXE /L [nnnn:nnnn]
  396.       * "nnnn:nnnn" (optional) is the hex representation of a far pointer
  397.         to a 4-byte buffer where the entry point of the TSR will be written.
  398.         (Remember not to put the square brackets in the actual command line.)
  399.         The far pointer spec cannot be used easily from batch files.
  400.  
  401. ---------- DVPT version 3.0 Instruction Manual ---------- page 8 ----------
  402.  
  403. After all operations are finished, FSSPEAK.EXE can be removed form memory
  404. by executing it as follows:
  405.  
  406.   FSSPEAK.EXE /U
  407.  
  408. The DOS "exit code" from these two operations can have the following values:
  409.  
  410.   0  - Successfully loaded into memory
  411.   2  - No parameters found on command line
  412.   3  - Unable to interpret command line
  413.   4  - Attempt to load twice; already in memory
  414.   5  - Attempt to remove from memory but program is not resident
  415.   17 - Cannot remove from memory because a later program hooked interrupt 2Fh
  416.   18 - Cannot remove from memory; unable to deallocate resident memory block
  417.   19 - DOS version number too low (must be 3.1 or higher)
  418.  
  419. As a TSR, the program accepts commands through int 2Fh with a multiplex
  420. number of 0EEh. At entry to every call, DS:BX must point to the ASCII
  421. string "FSSPEAK30@@@@@@@" and the multiplex number must be in AH. The
  422. individual functions (passed in AL) are:
  423.  
  424.         00h: check if program is in memory
  425.              AL returns as 0FFh if program is present
  426.         01h: remove program from memory
  427.         02h: get entry point for far calls
  428.              Entry point address is returned in DX:AX.
  429.  
  430. You don't need to call any of the above int 2Fh functions if you loaded
  431. FSSPEAK.EXE with the far pointer option. If it was loaded without this
  432. option, or the pointer to the TSR entry point has somehow been lost, then
  433. the following assembly code can be used to obtain it:
  434.  
  435.         .data
  436.         ; this is DGROUP
  437.         signature  db  'FSSPEAK30@@@@@@@'
  438.         .code
  439.                    mov   ax,DGROUP
  440.                    mov   ds,ax
  441.                    lea   bx,signature
  442.                    mov   ax,0EE02h
  443.                    int   2Fh
  444.  
  445. After this sequence, the TSR's entry point will be in the DX:AX register
  446. pair.
  447.  
  448. The TSR accepts far calls to its entry point. All parameters are passed on
  449. the stack. All pointers are far pointers. The Pascal calling convention is
  450. used. This is an example (in C) of a function prototype for the TSR entry
  451. point:
  452.  
  453.     long (pascal __far *FSSPEAK_ENTRYPOINT)(int command, unsigned int parm2,
  454.                                      unsigned char __far *parm3, long parm4);
  455.  
  456. ---------- DVPT version 3.0 Instruction Manual ---------- page 9 ----------
  457.  
  458. The following is a list of the four types of calls that can be made, and
  459. the content of each of the four parameters in each type of call:
  460.  
  461.     Set Sample Rate:
  462.         Parameter 1:  0001h
  463.         Parameter 2:  number of samples per second
  464.         Parameter 3:  NULL
  465.         Parameter 4:  0
  466.         Return value:  0 if success, 1 if invalid parameter,
  467.                        -1 if feature not available
  468.  
  469.     Set Compression Algorithm
  470.         Parameter 1:  0002h
  471.         Parameter 2:  0 = no compression
  472.                       1 = 4-bit uLaw
  473.                       2 = 2-bit ADPCM
  474.         Parameter 3:  NULL
  475.         Parameter 4:  0
  476.         Return value:  0 if success, 1 if invalid parameter,
  477.                        -1 if feature not available
  478.  
  479.     Set Destination and Calibrate
  480.         Parameter 1:  0003h
  481.         Parameter 2:  0FFFFh = auto-locate EAR-WIZARD; use internal
  482.                                  speaker if not found
  483.                       0      = internal speaker
  484.                       1      = LPT1
  485.                       2      = LPT2
  486.                       3      = LPT3
  487.         Parameter 3:  NULL
  488.         Parameter 4:  (meaningful only when using auto-locate)
  489.                       0 = use internal speaker if no EAR-WIZARD
  490.                       1 = return error if no EAR-WIZARD
  491.         Return value:  0 if success, 1 if invalid parameter,
  492.                        2 if CPU too slow,
  493.                        3 if under Windows without TrapTimerPorts=False,
  494.                        4 if EAR-WIZARD not found (see Parameter 4)
  495.  
  496.     Play Sound from Memory Buffer
  497.         Parameter 1:  0004h
  498.         Parameter 2:  0
  499.         Parameter 3:  far pointer to data buffer
  500.         Parameter 4:  32-bit integer; count of bytes in buffer
  501.         Return value:  Number of bytes played
  502.  
  503. The "Set Sample Rate" and "Set Compression Algorithm" calls will always
  504. return -1 in the Standard Version.
  505.  
  506. IMPORTANT: For the Professional Version: if the sample rate is changed
  507. and/or the compression algorithm is changed, then the "Set Destination and
  508. Calibrate" call must be made again before any further "Play Sound" calls.
  509.  
  510. Notice that the TSR does not perform memory allocation or file I/O
  511. operations. When using the module in this mode, your application is
  512. responsible for reading the desired sound data into memory.
  513.  
  514. ---------- DVPT version 3.0 Instruction Manual ---------- page 10 ---------
  515.  
  516. XI. The Example Programs
  517.     --------------------
  518.  
  519. EXAMPLE1.C and EXAMPLE1.EXE:
  520.   This is a working commented example, written in C, showing how to use the
  521.   FSSPEAK.EXE module as a transient program, loading and executing it each
  522.   time sound playback is required. EXAMPLE1 accepts an optional command line
  523.   parameter indicating which LPT port is connected to the EAR-WIZARD. If no
  524.   parameters are specified on the command line, then the program uses the
  525.   auto-locate feature to determine the destination. A command-line parameter
  526.   of "SPKR" forces the use of the internal PC speaker. Examine the C file for
  527.   details.
  528.  
  529.  
  530. EXAMPLE2.C and EXAMPLE2.EXE:
  531.   This example appears externally to perform the same function as EXAMPLE1;
  532.   however, EXAMPLE2 uses the FSSPEAK.EXE module as a TSR (memory-resident)
  533.   program. EXAMPLE2 itself actually performs the load and unload operation
  534.   on FSSPEAK.EXE. Another option is to load and unload in a batch file,
  535.   allowing your executable to get by with only calls to the resident entry
  536.   point (obtained with Int 2Fh function 0EE02h).
  537.  
  538.  
  539. RUN_ME.BAT:
  540.   This is an example of the use of FSSPEAK.EXE as a transient program in
  541.   the simplest possible mode: commands in a batch file.
  542.  
  543.  
  544. XII. Other Programs Included in the Toolkit
  545.      --------------------------------------
  546.  
  547. ULAW.EXE:
  548.   This program reduces the size of a voice data file by a 2:1 ratio by
  549.   encoding each 8-bit sample as a 4-bit number such that the quantization
  550.   error is minimized near the equilibrium (silence) point (80 hex) and
  551.   increases with increasing excursion. This is a common practice in telephone
  552.   systems used to reduce data throughput requirements. It causes surprisingly
  553.   little degradation of the sound quality, although there is some. The effect
  554.   of quantizing with this program has been described as a slightly "gritty"
  555.   quality in the reproduced speech.
  556.  
  557.   To use ULAW, type:
  558.         ULAW <source filename> <destination filename>
  559.  
  560.  
  561. UNULAW.EXE:
  562.   Decompresses files compressed with the ULAW.EXE program. Note that this
  563.   does not recover the full sound fidelity of the original file; this, like
  564.   almost every audio compression technique, is "lossy". Some of the original
  565.   information is lost in the compression process.
  566.  
  567.   To use UNULAW, type:
  568.         UNULAW <source filename> <destination filename>
  569.  
  570. ---------- DVPT version 3.0 Instruction Manual ---------- page 11 ---------
  571.  
  572. ADPCM.EXE:
  573.   This program reduces the size of a voice data file by a 4:1 ratio using
  574.   ADPCM (Adaptive Differential Pulse Code Modulation). Like most compression
  575.   schemes, some distortion is produced, but understandability is not seriously
  576.   reduced. If you need to package large amounts of recorded sound, and are
  577.   willing to accept a small reduction in sound quality, this is the method
  578.   to use.
  579.  
  580.   To use ADPCM, type:
  581.         ADPCM <source filename> <destination filename>
  582.  
  583.  
  584. UNADPCM.EXE:
  585.   Decompresses files compressed with the ADPCM.EXE program. Note that this
  586.   does not recover the full sound fidelity of the original file; this, like
  587.   almost every audio compression technique, is "lossy". Some of the original
  588.   information is lost in the compression process.
  589.  
  590.   To use UNADPCM, type:
  591.         UNADPCM <source filename> <destination filename>
  592.  
  593.  
  594. RESAMPLE.EXE:  (Professional version only)
  595.   If you need to import PCM files from other sources (8-bit only please),
  596.   or simply wish to alter the sample rate of a data file that has been
  597.   recorded with VDFE, this utility can accomplish that task. Reducing the
  598.   sample rate of an existing recording reduces its size at the expense of
  599.   spectral bandwidth. Increasing the sample rate of an existing recording
  600.   does not change its sound, and is normally done only in order to match
  601.   some other standard. LOWPASS.EXE must be in the current directory when
  602.   RESAMPLE is executed.
  603.  
  604.   RESAMPLE uses either 4 or 6 command-line parameters. They are:
  605.         * the original (source) file name
  606.         * the destination (new sample rate) file name
  607.         * the sample rate of the original file
  608.         * the desired sample rate of the new file
  609.         * the name of the original VDFE index file
  610.         * the name of the new index file
  611.   The last two parameters are optional. They are not needed if you are
  612.   not using index files. See the VDFE documentation (help file) for more
  613.   information on index files.
  614.  
  615.   Here is the syntax definition for RESAMPLE.EXE:
  616.     RESAMPLE <src file> <dest file> <src rate> <dest rate>
  617.                                        [<src index file> <dest index file>]
  618.  
  619.  
  620. MAKEWAVE.EXE:  (Professional version only)
  621.   This program is similar to RESAMPLE, except that (1) a standard WAV header
  622.   is added to the destination file, and (2) index files are not supported.
  623.   LOWPASS.EXE must be in the current directory when MAKEWAVE is executed.
  624.  
  625.   To use MAKEWAVE, type:
  626.         MAKEWAVE <src file> <dest file> [<src rate> [<dest rate>]]
  627.  
  628. ---------- DVPT version 3.0 Instruction Manual ---------- page 12 ---------
  629.  
  630. ADJUST.EXE:
  631.   The purpose of this program is to facilitate the adjustment and testing of
  632.   digitizer boards. It has no command line parameters; simply type ADJUST to
  633.   start the program. There are three items of interest on the display:
  634.     (1) The COM port to which the digitizer is presumably attached while this
  635.      program runs. Cycle through the ports numbers by pressing <F2> until the
  636.      correct number appears.
  637.     (2) A DC offset meter which indicates the value of the average reading
  638.      from thr A/D converter relative to the "ideal" center point of 80 hex.
  639.      This reading should be adjusted to zero using R24.
  640.     (3) A signal level meter. This shows the instantaneous peak-to-peak
  641.      level being received by the A/D converter. It should be as low as you
  642.      can get it (while not speaking, of course). A reading of 10 to 20 or
  643.      less is considered reasonable. If the reading is higher, then possible
  644.      trouble sources might be: (a) high levels of room background noise from
  645.      things such as fans and air conditioners, (b) powering the digitizer with
  646.      an electrically noisy power supply (it's designed for batteries; don't
  647.      bypass this!), (c) input gain control R8 set too high, or (d) the
  648.      digitizer may be sitting too near a source of radiated electrical noise,
  649.      such as a switching power supply or fluorescent lamp.
  650.  
  651.  
  652. XIII. How to Reduce Disk Space Requirements
  653.       -------------------------------------
  654.  
  655. For the ultimate level of data compression, to minimize disk space as
  656. much as can reasonably be done without severe degradation, first RESAMPLE
  657. a VDFE output file from 16572 to 11025 Hz (a standard rate), then compress
  658. with ADPCM.
  659.  
  660. Assuming the original data file to be named STUFF.VOI, this would be the
  661. command sequence:
  662.  
  663.         RESAMPLE stuff.voi stuff.low 16572 11025
  664.         ADPCM stuff.low stuff.adp
  665.  
  666. The file STUFF.ADP is shipped with the application; STUFF.LOW is an
  667. intermediate result and can be deleted.
  668.  
  669. Data files produced by VDFE are sampled at a rate of 16572 Hz. In this form,
  670. recorded sound occupies about 971 k bytes per minute. By reducing the sample
  671. rate to 11025 Hz, the requirement goes down to 646 k bytes per minute.
  672. Subsequently compressing with ADPCM brings this to a low figure of 162 k
  673. bytes per minute. In this format, a high-density 3.5 inch diskette (1.44
  674. megabytes) can hold about 8.5 minutes of recorded sound.
  675.  
  676. ---------- DVPT version 3.0 Instruction Manual ---------- page 13 ---------
  677.  
  678. XIV. The EAR-WIZARD Playback Device
  679.      ------------------------------
  680.  
  681. The EAR-WIZARD is an audio playback device which converts a parallel printer
  682. (LPT) port into a sound output port. For optimum and consistent sound
  683. reproduction on a variety of PCs including laptops, you can (optionally)
  684. sell an EAR-WIZARD with each copy of your application. See the "Pricing"
  685. section at the end of this file for quantity discounts on EAR-WIZARD.
  686. As an alternative, you might encourage end users to contact Farpoint
  687. Software directly if they would like to buy an EAR-WIZARD instead of using
  688. the internal speaker of the PC.
  689.  
  690. The EAR-WIZARD has dimensions of 0.65" by 1.90" by 2.17". It is in fact built
  691. into a standard DB-25 plastic "connector hood". There is a male DB-25
  692. connector that plugs into any parallel printer port, and a 3.5mm stereo-type
  693. phono jack which can drive either a set of headphones or an external speaker.
  694. A volume-control knob protrudes from one "edge" of the connector hood, giving
  695. the user an amplitude control range from zero up to a drive level sufficient
  696. to produce a reasonable volume level from an unamplified 8-ohm speaker. No
  697. external power source is required; all power to operate the device is taken
  698. from the printer port itself.
  699.  
  700.  
  701. XV. Playback Through the PC Speaker
  702.     -------------------------------
  703.  
  704. The speaker on the PC and its associated driver circuitry is quite simple and
  705. crude, having been designed primarily for creating single square-wave tones
  706. of various audio frequencies. This speaker is typically driven by a pair of
  707. transistors used as a current amplifier which is in turn driven directly by
  708. the output of a TTL gate. This results in only two possibilities of voltage
  709. across the voice coil: 0 volts and 5 volts. Any sound to be reproduced by
  710. this system must be reduced to an approximation in the form of a stream of
  711. constant-amplitude rectangular pulses of varying duration and frequency.
  712. In the playback module in this package, instantaneous DC drive voltages to
  713. the speaker are simulated by providing an alternating series of high and low
  714. output pulses such that the ratio of high pulses to low pulses averages out
  715. to the desired voltage. The lowpass filtering required is provided by the
  716. human ear and the mechanical limits of the speaker.
  717.  
  718.  
  719. XVI. Speed Requirements for the Target Machine
  720.      -----------------------------------------
  721.  
  722. A relatively high timing resolution is required to accomplish the playback
  723. task. This means that there is a minimum CPU speed requirement for proper
  724. functioning of FSSPEAK.EXE. Many factors affect the apparent speed of the
  725. machine, including clock speed, memory access timing, cache memory, etc.
  726. In general, the minimum speed required must at least equal that of a 10 MHz
  727. 286, so your programs should be targeted at systems with at least this level
  728. of performance.
  729.  
  730. ---------- DVPT version 3.0 Instruction Manual ---------- page 14 ---------
  731.  
  732. IMPORTANT: ALWAYS check the return value from any calibration call to
  733. FSSPEAK. The CPU speed requirements vary depending on sample rate and
  734. compression algorithm. It is important to know that, in order to avoid
  735. excessive "sampling squeal", FSSPEAK actually must play each sample twice
  736. when rates below 15000 Hz are specified. Also, the CPU speed required
  737. increases with increasing levels of compression. A "worst case" scenario
  738. is ADPCM compression at a rate of 14999 Hz; this requires at least a
  739. 386/33! If you know your code must work on slower CPUs, we recommend that
  740. you stick with the default sample rate of 16572 Hz and not use playback
  741. decompression. It is still possible to ship compressed files; your users
  742. will need either UNULAW.EXE or UNADPCM.EXE to decompress the data files on
  743. disk.
  744.  
  745.  
  746. XVII. General Information About the Digitizer (Recorder)
  747.       --------------------------------------------------
  748.  
  749. The digitizer is a classic 8-bit successive approximation analog-to-digital
  750. converter, combined with a microphone amplifier, anti-aliasing filter, level
  751. indicators, sample-and-hold amplifier, and a slightly odd 4-bit wide parallel
  752. interface to the PC serial port. Other features include a circuit which
  753. produces a small degree of amplitude compression to improve perceived
  754. loudness, an input gain control with a 20 decibel range (100:1), a DC offset
  755. trim, and a remote "stop" switch. The data read from the digitizer is stored
  756. as a simple list of 8-bit numbers, each indicating the voltage at the time of
  757. the sample. This storage scheme is commonly called PCM or Pulse Code
  758. Modulation.
  759.  
  760. The interface to the digitizer depends entirely on direct I/O bit manipulation
  761. of the PC serial port, and does NOT use the receiver serial interrupt. It
  762. should therefore work equally well connected to any PC serial port, from
  763. COM1 through COM4. The interconnecting cable must at least connect pins
  764. 3, 4, 5, 6, 7, 8, 20, and 22. When in doubt, use a full 25-wire "straight
  765. through" cable; a 2-3-7 or "three-wire" cable will not work. Do not use a
  766. null modem cable.
  767.  
  768. The circuit is designed to use a "dynamic" or moving magnetic coil type of
  769. microphone. Ceramic or piezoelectric (crystal) microphones can also be made
  770. to work by reducing the setting of the input gain control, but these types
  771. are often inferior to dynamic microphones. Electret and capacitor microphones
  772. won't work unless they provide their own DC biasing. The type of handheld
  773. microphone that often comes with cheap portable cassette tape recorders is a
  774. good bet.
  775.  
  776. The digitizer board is designed to operate from two conventional 9-volt
  777. batteries.
  778.  
  779. ---------- DVPT version 3.0 Instruction Manual ---------- page 15 ---------
  780.  
  781. XVIII. The Signal Level Indicators on the Digitizer
  782.        --------------------------------------------
  783.  
  784. The LED labelled D8 (green) is the -6 decibel threshold indicator; it lights
  785. when the signal exceeds one half of the maximum range of the A/D converter.
  786. The LED labelled D7 (red) is the clipping indicator; it lights when the
  787. signal level equals or exceeds the maximum range of the A/D converter. The
  788. lighting of the clipping indicator means that the peaks of the reproduced
  789. waveform will be clipped or "flat-topped". A small amount of clipping on
  790. speech waveforms generally does not degrade intelligibility, although it
  791. can be psychologically irritating if it occurs over a significant portion
  792. of the data.
  793.  
  794. The level indicators are designed to be used in the following way: When
  795. speaking into the microphone or making a recording from another source, the
  796. input level (gain) control R8 should be adjusted so that the -6db indicator
  797. remains lit a large percentage of the time, whereas the clipping indicator
  798. only flickers on the loudest peaks of the sound. This is the optimum signal
  799. level. It makes the maximum possible use of the resolution of the A/D
  800. converter without introducing an undue amount of clipping distortion.
  801.  
  802.  
  803. XIX. Using the EAR-WIZARD as a Security Device
  804.      -----------------------------------------
  805.  
  806. If you set up your application so that it will not use the internal speaker,
  807. then the EAR-WIZARD auto-locate feature can be used as a crude "hardware
  808. security key". You application should simply refuse to run if the calibrate
  809. pass (with auto-locate enabled) returns an indication that there is no
  810. EAR-WIZARD. This method is not as secure as a "real" dongle, but will thwart
  811. many people's efforts at pirating your software. If you are producing a
  812. shareware package, you might allow the unregistered version to use the
  813. internal speaker (but identify itself as unregistered), while the registered
  814. version uses only the EAR-WIZARD.
  815.  
  816. If a sufficient number of DVPT users indicate an interest in the use of
  817. the EAR-WIZARD as a security device, we plan to produce a version which
  818. incorporates a somewhat more serious (hard to defeat) mechanism which can
  819. be customized for each registered DVPT user.
  820.  
  821. ---------- DVPT version 3.0 Instruction Manual ---------- page 16 ---------
  822.  
  823. XX. Pricing
  824.     -------
  825.  
  826.  Software registration for personal use or use within a single
  827.  organization (redistribution not permitted):
  828.  
  829.     Standard Version      $50  (free with purchase of 10 or more EAR-WIZARDs)
  830.     Professional Version  $70  (free with purchase of 20 or more EAR-WIZARDs)
  831.  
  832. -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  833.  
  834.  Software registration and license to redistribute FSSPEAK.EXE:
  835.  
  836.     Standard Version      $75  (free with purchase of 20 or more EAR-WIZARDs)
  837.     Professional Version  $95  (free with purchase of 30 or more EAR-WIZARDs)
  838.  
  839. -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  840.  
  841.  EAR-WIZARD printer port playback device:
  842.  
  843.     Quantity 1 - 9        $25 each
  844.     Quantity 10 - 49      $22 each
  845.     Quantity 50 up        $18 each
  846.  
  847. -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  848.  
  849.  Fully complete and tested digitizer (sound recorder) board with 30 day
  850.  warranty (does not include enclosure, batteries, serial cable, or
  851.  microphone):
  852.  
  853.     For unlicensed users                   $79
  854.     With FSSPEAK redistribution license    $59
  855.  
  856. -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  857.  
  858. Incidental hardware: Although we can supply the following items, you
  859. can obtain them through your local consumer electronics stores and
  860. computer stores.
  861.  
  862.  Headphones for use with EAR-WIZARD        $11
  863.  
  864.  500 ohm Dynamic Microphone                $19
  865.  
  866.  DB-25 cable                               $20
  867.  
  868.  DB-9 to DB-25 adapter                     $10
  869.  
  870. -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  871.  
  872. NOTICE: Since our manufacturing costs may increase as parts costs increase
  873.         over time, the prices quoted for hardware items are valid only
  874.         through December 1994.
  875.  
  876. ---------- DVPT version 3.0 Instruction Manual ---------- page 17 ---------
  877.  
  878. Please address all correspondence to:
  879.  
  880.         Farpoint Software
  881.         2501 Afton Court
  882.         League City, Texas 77573-3438
  883.         U.S.A.
  884.  
  885. Telephone numbers, etc.:
  886.  
  887.         Voice: 713-332-3782
  888.         Fax:   713-332-4730 
  889.         Compuserve ID: 74030,554
  890.  
  891. If at all possible, use the form created by printing the file ORDER.FRM.
  892. If you choose to write in the information by hand, please print clearly.
  893.  
  894. Please make all checks and/or money orders payable to Farpoint Software.
  895.